<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class StoreExpertRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name'=>'required|min:2|max:20',
            'sex'=>'required',

            'position'=>'required',
            'photo'=>'required',
            'department'=>'required',
            'hospital'=>'required',
            'introduction'=>'required',
            'degree'=>'required',

        ];
    }
    public function messages()
    {
        return [
            'required'=>'该项不能为空',
        ];
    }
}
